<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>快速入门</title>
</head>
<body>
    <!--【需求】：将Vue中定义的值展示到标签的内容体中-->
    <div id="div">
        <p>姓名：{{name}}</p>
        <p>年龄：{{age}}</p>
    </div>

    <input type="button" value="修改name的值" onclick="changeName()">
    <input type="button" value="修改age的值" onclick="changeAge()">
    <input type="button" value="修改name和age的值" onclick="changeNameAndAge()">

</body>
<script src="js/vue.js"></script>
<script>
         let vue = new Vue({
            //定义接管区域
            el:"div",
            //定义变量
            data:{
                name:"左十二",
                age:20
            }
         });
         function changeName() {
             vue.name="吴贱贱";
         }
         function changeAge() {
             vue.age=22;
         }
         function changeNameAndAge() {
             vue.name="张靓颖";
             vue.age=35;
         }
</script>
</html>